
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 舒俊容
  Date: 2021/12/15
  Time: 11:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" language="java" %>

<header class="header container">
    <div class="logo">校园论坛</div>
    <div class="search">
        <input type="text" class="search-input" placeholder="搜索帖子...">
        <i class="fas fa-search search-btn"></i>
    </div>
    <ul class="right1">
        <li><a href="/userinfo.jsp"><img src="${pageContext.request.contextPath}/img/${sessionScope.user.photo}" class="pic" width="32px"></a></li>
        <li class="xia">
            <a href="#" class="dropdown-toggle" data-toggle="xia" role="button" aria-haspopup="true"
               aria-expanded="false">${sessionScope.user.nickname}<span class="caret"></span></a>
            <ul class="dmenu">
                <li><a href="/userinfo.jsp">个人信息</a></li>
                <li><a href="change_password.jsp">修改密码</a></li>
                <li role="separator" class="divider"></li>
                <li><a href="javascript:logout()">退出</a></li>
            </ul>
        </li>
    </ul>
</header>
<script>
    function logout() {
        if(confirm("您确定定要退出吗？")){
            window.location.href = "logout.jsp"; //前端页面跳转
        }
    }
</script>
